---
title: oras manifest fetch
sidebar_position: 110
warning: Do NOT modify this generated file
---

# oras manifest fetch

Fetch manifest of the target artifact

```bash
oras manifest fetch [flags] <name>{:<tag>|@<digest>}
```

## Examples

Fetch raw manifest from a registry:

```bash
oras manifest fetch localhost:5000/hello:v1
```

Fetch the descriptor of a manifest from a registry:

```bash
oras manifest fetch --descriptor localhost:5000/hello:v1
```

[Experimental] Fetch the manifest digest from a registry similar to the resolve command:

```bash
oras manifest fetch --format go-template --template '{{ .digest }}' localhost:5000/hello:v1
```

[Experimental] Fetch manifest and output metadata encoded in JSON:

```bash
oras manifest fetch localhost:5000/hello:v1 --format json
```

Fetch manifest from a registry with specified media type:

```bash
oras manifest fetch --media-type 'application/vnd.oci.image.manifest.v1+json' localhost:5000/hello:v1
```

Fetch manifest from a registry with certain platform:

```bash
oras manifest fetch --platform 'linux/arm/v5' localhost:5000/hello:v1
```

Fetch manifest from a registry with prettified json result:

```bash
oras manifest fetch --pretty localhost:5000/hello:v1
```

Fetch raw manifest from an OCI image layout folder 'layout-dir':

```bash
oras manifest fetch --oci-layout layout-dir:v1
```

Fetch raw manifest from an OCI layout archive file 'layout.tar':

```bash
oras manifest fetch --oci-layout layout.tar:v1
```

## Options

```
      --ca-file string                              server certificate authority file for the remote registry
      --cert-file string                            client certificate file for the remote registry
  -d, --debug                                       output debug logs (implies --no-tty)
      --descriptor                                  output the descriptor
      --format string                               [Experimental] Format output using a custom template:
                                                    'json':         Print in prettified JSON format
                                                    'go-template':  Print using the given Go template
  -H, --header stringArray                          add custom headers to requests
  -h, --help                                        help for fetch
      --identity-token string                       registry identity token
      --identity-token-stdin                        read identity token from stdin
      --insecure                                    allow connections to SSL registry without certs
      --key-file string                             client private key file for the remote registry
      --media-type strings                          accepted media types
      --no-tty                                      [Preview] do not show progress output
      --oci-layout                                  set target as an OCI image layout
  -o, --output path                                 file path to write the fetched manifest to, use - for stdout
  -p, --password string                             registry password or identity token
      --password-stdin                              read password from stdin
      --plain-http                                  allow insecure connections to registry without SSL check
      --platform os[/arch][/variant][:os_version]   request platform in the form of os[/arch][/variant][:os_version]
      --pretty                                      prettify JSON objects printed to stdout
      --registry-config path                        path of the authentication file for registry
      --resolve host:port:address[:address_port]    customized DNS for registry, formatted in host:port:address[:address_port]
      --template string                             [Experimental] Template string used to format output
  -u, --username string                             registry username
  -v, --verbose                                     verbose output
```
